@extends('layouts.console_header')

@section('title', '地推详情')

@section('resources')
    @parent
    <link rel="stylesheet" href="{{env('CSS_DOMAIN')}}css/jquery.dataTables.min.css?v={{env('CSS_VERSION')}}">
    <style>
    	.shop_get_shopul{width: 800px;overflow: hidden;margin: 20px 30px;}
    	.shop_get_shopul li{width: 400px;float: left;margin: 10px 0;}
    	#example_filter{display: none;}
    </style>
@endsection

@section('content')
<section class="user_list">
	<div style="border-bottom: 2px solid #9955c6;overflow: hidden;">
		<p class="fz_14 account_title fl" style="border: none;">
		    <span style="color: #7f7f7f;"><a href="/console/index">首页</a>>地推管理><a href="/console/salesman/shop/lists">地推商家列表</a>
		        ></span><span class="co_violet">地推详情
            </span>
        </p>
		<a onclick="history.go(-1);" href="#"><p class="fr tc back_btn">返回</p></a>
		{{--<a href="#"><p class="fr tc back_btn">导出</p></a>--}}
	</div>
	<div style="background-color: #fff;">
		<ul class="shop_get_shopul">
			<li class="fz_13 co_gray56"><span>门店名称 ：</span><span>{{$info['name']}}</span></li>
			<li class="fz_13 co_gray56"><span>门店地址 ：</span><span>{{$info['address']}}</span></li>
			<li class="fz_13 co_gray56"><span>地推时间：</span><span>{{$info['contractmonth']}}个月</span></li>
			<li class="fz_13 co_gray56"><span>地推创建日：</span><span>{{$info['contractstarttime']}}</span></li>
            <li class="fz_13 co_gray56"><span>缴纳金额：</span><span>{{$info['payfee']}}元</span></li>
            <li class="fz_13 co_gray56"><span>地推到期日：</span><span>{{$info['contractlasttime']}}</span></li>
		</ul>
	    <table id="example" class="display" cellspacing="0" width="100%">
	        <thead>
	            <tr>
	                <th>序号</th>
	                <th>日期</th>
	                <th>注册用户</th>
	                <th>有效注册用户</th>
	                <th>订单数</th>
                	<th>地推订单数</th>
                	<th>地推订单实付</th>
	                <th>操作</th>
	            </tr>
	        </thead>
	        <tfoot>
	            <tr>
	                <th>序号</th>
	                <th>日期</th>
	                <th>注册用户</th>
	                <th>有效注册用户</th>
	                <th>订单数</th>
                	<th>地推订单数</th><!-- TODO -->
                	<th>地推订单实付</th>
	                <th>操作</th>
	            </tr>
	        </tfoot>
	        <tbody>
	        @foreach($lists as $list)
	            <tr>
	            @if(!isset($i))
	            	<td>{{$i=1}}</td>
                @else
                    <td>{{++$i}}</td>
                @endif
	                <td>{{$list['date']}}</td>
	                <td>{{$list['registernum']}}</td>
	                <td>{{$list['validregisternum']}}</td>
	                <td>{{$list['ordernum']}}</td>
	                <td>{{$list['validordernum']}}</td>
	                <td>{{$list['orderamount']}}</td>
	                <td>
	                	<a class="co_violet" href="/console/salesman/shop/register/lists?cityid={{$cityid}}&shopid={{$shopid}}&date={{$list['date']}}">注册用户</a>
	                	<a style="margin-left: 30px;" class="co_violet" href="/console/salesman/shop/order/lists?cityid={{$cityid}}&shopid={{$shopid}}&date={{$list['date']}}">地推订单</a>
	                </td>
	            </tr>
            @endforeach
	        </tbody>
	    </table>
	</div>
</section>
@endsection

@section('scriptResources')
    @parent
    <script src="{{env('JS_DOMAIN')}}js/jquery.dataTables.min.js?v={{env('JS_VERSION')}}"></script>
    <script>
    	$(function(){
    		
    	})
    </script>
@endsection